<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>添加模型字段页面</title>
<css file='__PUBLIC__/css/base.css' />
<jquery />
<js file='__PUBLIC__/js/iframe.js' />
<js file='__PUBLIC__/js/field.js' />
            <link type="text/css" href="__ROOT__/data/ui/css/flick/jquery-ui-1.8.23.custom.css" rel="stylesheet" />
            <script type="text/javascript" src="__ROOT__/data/ui/js/jquery-1.8.0.min.js"></script>
            <script type="text/javascript" src="__ROOT__/data/ui/js/jquery-ui-1.8.23.custom.min.js"></script>
            <script type="text/javascript">
                $(function(){
                    $("#tabs").tabs();
                })
            </script>

    </head>
    <body style="padding:10px;">
        <div class="now_path">
            <strong>您现在的位置：</strong>
            <a href="__CONTROL__/index">字段管理</a> > 字段修改
        </div>
		<fieldset class='field_tishi'>
			<legend>操作提示</legend>
			修改字段的时候，请注意修改字段的视图显示类型（字段类型）
		</fieldset>
        <form action="__CONTROL__/field_modify_exe" method="post">
            <input type="hidden" name="old_field_name" value="{$fields.fname}"/>
			<input type="hidden" name="old_field_fid" value="{$fields.fid}"/>
            <div id="tabs">
                <ul>
                    <li><a href="#tabs-0">基本内容</a></li>
                </ul>
                <div id="tabs-0">   
                    <table class="table2">
                        <tr>
                            <th>字段名称：</th>
                            <td><input type="text" name="fname" style="width:260px;" value='{$fields.fname}'/>
                                <span class="desc">必须输入英文</span></td>
                        </tr>
                        <tr>
                            <th>字段标题：</th>
                            <td><input type="text" name="title" style="width:380px;" value='{$fields.title}'/>
                                <span class="desc">说明标题(中文)</span>
                        </tr>
                        <tr>
                            <th>字段描述：</th>
                            <td><textarea name="description" style="width:460px; height:60px;">{$fields.description}</textarea></td>
                        </tr>
                        <tr>
                            <th>主表字段：</th>
                            <td><if value='$fields.tablename eq $model.ptable' >
                                <input type="radio" name="tablename" value="{$model.ptable}" checked="checked"/>是&nbsp;&nbsp;
                                <input type="radio" name="tablename" value="{$model.stable}" />否 
								<else />
								<input type="radio" name="tablename" value="{$model.ptable}" />是&nbsp;&nbsp;
                                <input type="radio" name="tablename" value="{$model.stable}" checked="checked"/>否 
								</if>
                            </td>
                        </tr>
                        <tr>
                            <th>字段类型<font style='color:blue'>(请仔细修改)</font>：</th>
                            <td>
                                <select name="type" id="type">
                                    <option value="">选择类型</option>
                                    <option value="text">单行文本</option>
                                    <option value="textarea">多行文本</option>
                                    <option value="radio">单选框</option>
                                    <option value="checkbox">复选框</option>
                                    <option value="editor">编辑器</option>
                                    <option value="int">数字</option>
                                    <option value="upload">文件上传</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <th>详细设置：</th>
                            <td>
                                <div id="fieldset">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <th>正则验证规则：</th>
                            <td>
                                <input type="text" name="validate" style="width:460px;" value='{$fields.validate}'/>
                                <span class="desc">验证规则正则表达式</span>
                            </td>
                        </tr>
                        <tr>
                            <th>启用：</th>
                            <td>
                            	<if value='$fields.state eq 1'>
                                <input type="radio" name="state" value="1" checked="checked"/>是&nbsp;&nbsp;
                                <input type="radio" name="state" value="0" />否 
								<else />
								 <input type="radio" name="state" value="1" />是&nbsp;&nbsp;
                                <input type="radio" name="state" value="0" checked="checked"/>否 
								</if>
                            </td>
                        </tr>

                    </table>
                </div>

                <div style="padding-left:100px;">
					<input type='hidden' name='tablename' value='{$fields.tablename}' />
					<input type='hidden' name='mid' value='{$fields.mid}' />
                    <input type="submit" value="提交修改" class="submit" id='modify_field_sub'/>
                </div>
            </div>
        </form>
    </body>
</html>
